package com.alibaba.citrus.ots.sales.plan.api.statistics;

import com.alibaba.citrus.ots.sales.plan.dto.api.request.PageQueryDepartmentTaskCountRequest;
import com.alibaba.citrus.ots.sales.plan.dto.api.request.PageQueryPlanScItemStatRequest;
import com.alibaba.citrus.ots.sales.plan.dto.api.request.QueryPlanScItemStatRequest;
import com.alibaba.citrus.ots.sales.plan.dto.api.request.SalesPlanScItemStatSubTotalRequest;
import com.alibaba.citrus.ots.sales.plan.dto.api.response.DepartmentResponse;
import com.alibaba.citrus.ots.sales.plan.dto.api.response.SalesPlanScItemStatSubTotalResponse;
import com.alibaba.citrus.ots.sales.plan.sdo.SalesPlanStatScItemSDO;
import com.alibaba.cz.base.tool.page.PageResult;
import com.alibaba.lattice2.epoch.meshflow.model.annotation.MeshFlowService;
import com.alibaba.lattice2.epoch.sdk.model.Result;

import java.util.List;
import java.util.Map;

/**
 * @author yuhailin
 * @description:
 * @date 2021-09-27 10:26
 */
@MeshFlowService(apps = {"bc_ots"}, name = "salesPlanScItemStatQueryService")
public interface SalesPlanScItemStatQueryService {
    /**
     * 计划-货品维度-列表查询
     *
     * @param pageQueryPlanScItemStatRequest
     * @return
     */
    Result<PageResult<List<SalesPlanStatScItemSDO>>> pageQueryPlanScItemList(PageQueryPlanScItemStatRequest pageQueryPlanScItemStatRequest);

    /**
     * 计划-货品维度-部门任务量查询
     *
     * @param queryDepartmentTaskCountRequest
     * @return
     */
    Result<PageResult<List<SalesPlanStatScItemSDO>>> queryDepartmentTaskCountList(PageQueryDepartmentTaskCountRequest queryDepartmentTaskCountRequest);

    /**
     * 计划-货品维度-根据bizIds批量查询计划货品
     *
     * @param queryPlanScItemStatRequest
     * @return
     */
    Result<PageResult<List<SalesPlanStatScItemSDO>>> batchQueryPlanScItemByBizId(QueryPlanScItemStatRequest queryPlanScItemStatRequest);

    /**
     * 计划-货品维度-根据planId,scItemId查询计划货品
     *
     * @param queryPlanScItemStatRequest
     * @return
     */
    Result<List<SalesPlanStatScItemSDO>> queryPlanScItemByPlanId(QueryPlanScItemStatRequest queryPlanScItemStatRequest);

    /**
     * 根据ID查询计划货品
     *
     * @param queryPlanScItemStatRequest
     * @return
     */
    Result<SalesPlanStatScItemSDO> queryPlanScItemById(QueryPlanScItemStatRequest queryPlanScItemStatRequest);

    /**
     * @param pageQueryDepartmentTaskCountRequest
     * @return
     */
    Result<SalesPlanStatScItemSDO> queryPlanScItemDepartmentTaskCount(PageQueryPlanScItemStatRequest pageQueryDepartmentTaskCountRequest);

    /**
     * 月度计划汇总小计
     *
     * @param salesPlanScItemStatSubTotalRequest
     * @return
     */
    Result<SalesPlanScItemStatSubTotalResponse> subTotalSalesPlanScItemStat(SalesPlanScItemStatSubTotalRequest salesPlanScItemStatSubTotalRequest);

    /**
     * 分页查询回退上一级月度计划汇总数据
     *
     * @param request
     * @return
     */
    Result<PageResult<List<SalesPlanStatScItemSDO>>> pageQueryBackPlanScItemList(PageQueryPlanScItemStatRequest request);


    /**
     * 货品维度查询归属部门
     *
     * @param request
     * @return
     */
    Result<List<DepartmentResponse>> dimensionGoodsQueryDepartment(PageQueryPlanScItemStatRequest request);

}
